const mongoose = require('mongoose')

//创建管理员集合
const adminSchema = mongoose.Schema({
    advTitle: {
      type: String,
      required: true,
    },
    advType: {
      type: String,
      required: true
    },
    advOrder: {
      type: String,
      required: true
    },
    advHref: {
      type: String,
      require: true,
    },
    addTime: {
      type: String,
      require: true
    },
    updateTime: {
        type: String,
        required: true,
        default: "--"
    }
  });
//根据这个约束对象创建一个管理员列表的集合
const advModel = mongoose.model("advList", adminSchema);

module.exports = advModel;